import Head from '@/components/Head'
import Tkd from '@/ssr/tkd'

// css
import styles from '@/styles/CommonDetail.module.scss'

// 组件
import Breadcrumb from '@/components/Breadcrumb'
import SubNav from '@/pages_components/components/SubNav'
import Detail from '@/pages_components/detail/Detail'
import RelateTicket from '@/pages_components/destination/RelateTicket'
import RelateHotel from '@/pages_components/destination/RelateHotel'
import RelateRoute from '@/pages_components/destination/RelateRoute'

export default function Main({ id, city, params, data: { ssr, ssr_route, ssr_hotel, ssr_ticket } }) {

    return (
        <div className={styles['common-detail-page']}>
            {/* tkd */}
            <Head meta={Tkd['/destination'](city)} />
            <div className="max-content">
                {/* 面包屑 */}
                <Breadcrumb params={[{ name: '目的地', url: '/destination' }, ...params]} />
                <SubNav />
                {/* 详情 */}
                <section className={styles['detail-wrap']}>
                    <h1 className={styles["detail-title"]}>{city}</h1>
                    <Detail target="/destination" data={ssr} />
                </section>
                {/* 相关推荐 */}
                <RelateTicket id={id} city={city} data={ssr_ticket} />
                <RelateHotel id={id} city={city} data={ssr_hotel} />
                <RelateRoute id={id} city={city} data={ssr_route} />
            </div>
        </div>
    )
}
